package com.kexio.sms.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.kexio.common.entity.BaseEntity;

/**
 * 短信模板
 * 
 * @author Kexio Team
 * @since 1.0.0
 */
@TableName("sms_template")
public class SmsTemplate extends BaseEntity {
    
    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;
    
    /**
     * 模板名称
     */
    @TableField("template_name")
    private String templateName;
    
    /**
     * 模板编码
     */
    @TableField("template_code")
    private String templateCode;
    
    /**
     * 短信类型 (verification, notification, marketing)
     */
    @TableField("sms_type")
    private String smsType;
    
    /**
     * 模板内容
     */
    @TableField("content")
    private String content;
    
    /**
     * 服务提供商 (aliyun, tencent, huawei)
     */
    @TableField("provider")
    private String provider;
    
    /**
     * 第三方模板ID
     */
    @TableField("provider_template_id")
    private String providerTemplateId;
    
    /**
     * 短信签名
     */
    @TableField("sign_name")
    private String signName;
    
    /**
     * 参数说明 (JSON格式)
     */
    @TableField("param_description")
    private String paramDescription;
    
    /**
     * 模板状态 (active, inactive)
     */
    @TableField("status")
    private String status;
    
    /**
     * 审核状态 (pending, approved, rejected)
     */
    @TableField("audit_status")
    private String auditStatus;
    
    /**
     * 审核说明
     */
    @TableField("audit_remark")
    private String auditRemark;
    
    /**
     * 使用次数
     */
    @TableField("usage_count")
    private Long usageCount;
    
    /**
     * 排序号
     */
    @TableField("sort_order")
    private Integer sortOrder;
    
    // Constructors
    public SmsTemplate() {}
    
    public SmsTemplate(String templateName, String templateCode, String smsType, String content, String provider) {
        this.templateName = templateName;
        this.templateCode = templateCode;
        this.smsType = smsType;
        this.content = content;
        this.provider = provider;
        this.status = "active";
        this.auditStatus = "pending";
        this.usageCount = 0L;
        this.sortOrder = 0;
    }
    
    // Getters and Setters
    public String getId() { return id; }
    public void setId(String id) { this.id = id; }
    
    public String getTemplateName() { return templateName; }
    public void setTemplateName(String templateName) { this.templateName = templateName; }
    
    public String getTemplateCode() { return templateCode; }
    public void setTemplateCode(String templateCode) { this.templateCode = templateCode; }
    
    public String getSmsType() { return smsType; }
    public void setSmsType(String smsType) { this.smsType = smsType; }
    
    public String getContent() { return content; }
    public void setContent(String content) { this.content = content; }
    
    public String getProvider() { return provider; }
    public void setProvider(String provider) { this.provider = provider; }
    
    public String getProviderTemplateId() { return providerTemplateId; }
    public void setProviderTemplateId(String providerTemplateId) { this.providerTemplateId = providerTemplateId; }
    
    public String getSignName() { return signName; }
    public void setSignName(String signName) { this.signName = signName; }
    
    public String getParamDescription() { return paramDescription; }
    public void setParamDescription(String paramDescription) { this.paramDescription = paramDescription; }
    
    public String getStatus() { return status; }
    public void setStatus(String status) { this.status = status; }
    
    public String getAuditStatus() { return auditStatus; }
    public void setAuditStatus(String auditStatus) { this.auditStatus = auditStatus; }
    
    public String getAuditRemark() { return auditRemark; }
    public void setAuditRemark(String auditRemark) { this.auditRemark = auditRemark; }
    
    public Long getUsageCount() { return usageCount; }
    public void setUsageCount(Long usageCount) { this.usageCount = usageCount; }
    
    public Integer getSortOrder() { return sortOrder; }
    public void setSortOrder(Integer sortOrder) { this.sortOrder = sortOrder; }
}
